import React from "react";
// var user = {
//   name:"111",
//   age:1
// }

// user.name 
// var {name} = usr

class Footer extends React.Component{
  constructor(props){
    super(props)
  }

  render(){
    return(
      <div>
        <h1>我是一个页脚</h1>
        <input type="text" ref="input"/>
        <button onClick={()=>{
          //通过ref获取输入框 
          var input = this.refs.input;
          console.log(input.value)
        }}>点击</button>
      </div>
    );
  }
}

export default Footer;